<%@page contentType="text/html" import="java.sql.*,java.text.*,java.util.*,merlin.beans.*,merlin.dao.*,merlin.managers.*,merlin.utils.*" %>

<!--
	Industry Watch Download reports.

	Author:	Sandip Bhattacharya (sandipkb@yahoo.com)
-->

<%
	String reportDownloadPage = null, iwMainPage = null;

	// let the user access the system only if he is logged in.
	if(session.getAttribute("IWusername") == null){
		response.sendRedirect("IndustryWatchLogin.jsp");
		return;
	}

	// check 2 : see if the user has agreed to the licence agreement or not.
  	IWCustomerDetailsBean bean = (IWCustomerDetailsBean)session.getAttribute("IWUserDetails");

	// additional check : the user cannot be a demo user.
  	if(bean.isTrialIndicator()){
  		reportDownloadPage = "iwDownloadFullReportsDemoVersion.jsp";
		iwMainPage = "iwMainPageDemoVersion.jsp";
  	}else{
  		reportDownloadPage = "iwDownloadFullReports.jsp";
		iwMainPage = "iwMainPage.jsp";
  	}
%>
<HTML>
<HEAD>
    <TITLE>Merlin Scott Report Download</TITLE>
</HEAD>
<BODY>
		<jsp:include page = "iwHeaderSmall.jsp"/>
		<table width="800" align="center">
			<tr>
				<td align="center">
					<p>&nbsp;<p>
     				Thank you for your order. <a href='<%=reportDownloadPage%>'><span style="font-size:11px; font-weight:bold">Click here to download your report(s)</span></a>
				</td>
			</tr>
			<tr>
				<td align="center">
					<p>&nbsp;<a href="<%=iwMainPage%>">Return to Industry Watch</a>
				</td>
			</tr>
		</table>
</BODY>
</HTML>